Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uiw/react-empty

Package Overview
Dependencies
Maintainers
2
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-empty

Empty component

  • 5.0.0-bate-9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
129
Maintainers
2
Weekly downloads
 
Created
Source

Empty 空状态

Open in unpkg NPM Downloads npm version

空状态时的展示占位图。新组件 v4.11.0+ 支持。

import { Empty } from 'uiw';
// or
import Empty from '@uiw/react-empty';

基本使用

import React from 'react';
import { Empty } from 'uiw';

function Demo() {
  return <Empty />
}
export default Demo

自定义

通过自定义属性定制个性化展示。

import React from 'react';
import { Empty, Icon, Button } from 'uiw';

const Demo = () => {
  return(
    <Empty
      description={
        <span>
          Customize <a href="#">Description</a>
        </span>
      }
      icon={<Icon type="shopping-cart"  style={{ fontSize: '39px' }} />}
    >
      <Button type="primary">新增数据</Button>
    </Empty>
  )
}

export default Demo

无描述展示

import React from 'react';
import { Empty } from 'uiw';

function Demo() {
  return <Empty description={false} />
}
export default Demo

Props

参数说明类型默认值
description自定义描述内容ReactNode暂无数据
icon可以替换内置图标ReactNode-
size内置 svg 图标:尺寸number | string-
iconProps内置 svg 图标:属性设置React.SVGProps<SVGSVGElement>-

Keywords

FAQs

Package last updated on 06 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc